//
//  XCYAudioTool.h
//  01-播放音效
//
//  Created by 冯华强 on 15/10/8.
//  Copyright (c) 2015年 HQ. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

@interface XCYAudioTool : NSObject

+ (void)playAudioWithFileName:(NSString *)fileName;

+ (void)disposeSystemSoundIDWithFileName:(NSString *)fileName;


/**
 *  播放与暂停
 *  @param fileName 文件名
 *  @param isBundle YES传递fileName NO fileName传递filePath
 *  @param numberOfLoops 重复次数
 */
+ (AVAudioPlayer *)playingAndPasueMusicWithFileName:(NSString *)fileName isBundle:(BOOL)isBundle numberOfLoops:(NSInteger)numberOfLoops;

/**
 *  播放与暂停
 *  @param fileName 文件名
 *  @param isBundle YES传递fileName NO fileName传递filePath
 */
+ (AVAudioPlayer *)playingAndPasueMusicWithFileName:(NSString *)fileName isBundle:(BOOL)isBundle;
/**
 *  播放
 *  @param fileName 文件名
 *  @param isBundle YES传递fileName NO fileName传递filePath
 */
+ (AVAudioPlayer *)playingMusicWithFileName:(NSString *)fileName isBundle:(BOOL)isBundle;
/**
 *  暂停
 *  @param fileName 文件名
 */
+ (AVAudioPlayer *)pasueMusicWithFileName:(NSString *)fileName;
/**
 *  停止
 *  @param fileName 文件名
 */
+ (void)stopMusicWithFileName:(NSString *)fileName;

/**
 * 停止和销毁所有音频
 */
+ (void)stopAllMusic;
@end
